﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Judgment
    {
        enum box
        { 剪刀 = 1, 石头, 布 }

        private string perName;
        private string computerName;
        private int perNum;
        private int comNum;


        public string PerName { get => perName; set => perName = value; }
        public string ComputerName { get => computerName; set => computerName = value; }
        public int PerNum { get => perNum; set => perNum = value; }
        public int ComNum { get => comNum; set => comNum = value; }

        public void ju()
        {
            if (perNum>comNum)
            {
                Console.WriteLine("{0} 出拳：{1}",this.perName,(box)(this.perNum));
                Console.WriteLine("{0} 出拳：{1}", this.computerName, (box)(this.ComNum));
                Console.WriteLine("{0}输了",this.computerName);
            }
            else if (perNum<comNum)
            {
                Console.WriteLine("{0} 出拳：{1}", this.perName, (box)(this.perNum));
                Console.WriteLine("{0} 出拳：{1}", this.computerName, (box)(this.ComNum));
                Console.WriteLine("{0} 输了", this.perName);
            }
            else
            {
                Console.WriteLine("{0} 出拳：{1}", this.perName, (box)(this.perNum));
                Console.WriteLine("{0} 出拳：{1}", this.computerName, (box)(this.ComNum));
                Console.WriteLine("平局");
            }
        }
    }
}
